import { Redirect } from 'umi'
import { useStatus } from '@/hooks'

export default (props: any) => {
  const { Status } = useStatus();
  if (Status) {
    return <div>{ props.children }</div>;
  } else {
    return <Redirect to="/status" />;
  }
}